#include<stdio.h>
int main()
{
	
	for (int n = 100; n <= 1000; n++)
	{
		int i = n % 10;
		int j = n / 10 % 10;
		int k = n / 100;
		int sum = i * i * i + j * j * j + k * k * k ;
		if (sum == n)
		{
			printf("%d ", n);
		}
	}
	return 0;
}